|
The function RtcplSetHALTimerPeriod sets the HAL Timer period for the RTX subsystem.
Syntax
BOOL RtcplSetHALTimerPeriod(
DWORD Period
);
Parameters
Period
Specifies the HAL timer period.
On PIC systems, the following defined values are supported:
Value |
HAL timer period is |
HAL_TIMER_PERIOD_100 |
100 microseconds, default |
HAL_TIMER_PERIOD_200 |
200 microseconds |
HAL_TIMER_PERIOD_500 |
500 microseconds |
HAL_TIMER_PERIOD_1000 |
1000 microseconds |
APIC systems can use any of the defined values below, or set a custom value between 1 and 1000.
Value |
HAL timer period is |
HAL_TIMER_PERIOD_1 |
1 microsecond |
HAL_TIMER_PERIOD_2 |
2 microseconds |
HAL_TIMER_PERIOD_5 |
5 microseconds |
HAL_TIMER_PERIOD_10 |
10 microseconds |
HAL_TIMER_PERIOD_20 |
20 microseconds |
HAL_TIMER_PERIOD_50 |
50 microseconds |
HAL_TIMER_PERIOD_100 |
100 microseconds, default |
HAL_TIMER_PERIOD_200 |
200 microseconds |
HAL_TIMER_PERIOD_500 |
500 microseconds |
HAL_TIMER_PERIOD_1000 |
1000 microseconds |
NOTE: You should use caution when setting the HAL timer period below 10µs and fully test the the timer period on all systems you will deploy on. If the HAL timer period is too fast, it can cause Windows to hang.
Return Values
A non-zero value if the function succeeds
Remarks
Changing this value requires a restart of the RTX Subsystem if it is running, as indicated by a GetLastError of ERROR_SUCCESS_RESTART_REQUIRED.
The HAL Timer Period is an internal timer object that timer functions in RTX applications synchronize with. The default value for the HAL Timer Period is 100 microseconds. If the requirements of an RTX application specify a HAL Timer Period of a high resolution, then this setting may need to be changed.
Related RTX Properties Control Panel Features
Tab |
|
Dialog Box |
Click the Settings button in the Behavior area to open the Behavior Settings dialog box. |
Feature(s) |
HAL timer period (microseconds) option |
Requirements
Header | RtxProp.h |
Library | RtxProp.lib |